package cc.facesign.admin.controller.client;

import cc.facesign.admin.bean.vo.DeptVo;
import cc.facesign.admin.service.TblDeptService;
import cc.facesign.common.utils.bean.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/admin/client/dept")
public class DeptClientController {

    @Autowired
    private TblDeptService deptService;

    @ApiOperation("批量获取部门信息")
    @PostMapping("/getInfoBatch")
    public R getInfoBatch(@RequestParam("ids") List<String> ids) {
        List<DeptVo> res = deptService.getInfoBatch(ids);
        return R.ok().data("data", res);
    }
}
